import { http } from "@/utils/http";

// export interface PurchaseApply {
//   id: string;
//   name: string;
//   total_price: number;
//   dept_id: string;
//   dept_name: string;
//   emp_id: string;
//   apply_name: string;
//   apply_date: string;
//   users_name: string;
//   status: string;
//   memo: string;
// }

// 这里定义返回值类型，使接口拥有良好的类型推导
export type getPurchaseApprovalResutl = {
  /** 是否请求成功 */
  success: boolean;
  code: number;
  msg: string;
  data?: {
    list: Array<any>;
  };
};

//查询所有采购审批表
export const getPurchaseApproval = (data?: object) => {
  return http.request<getPurchaseApprovalResutl>(
    "post",
    "/purchase/getPurchaseApproval",
    { data }
  );
};
